package net.xiangcaowuyu.activemqdemo.config;

import net.xiangcaowuyu.activemqdemo.constants.Constants;
import org.apache.activemq.command.ActiveMQQueue;
import org.apache.activemq.command.ActiveMQTopic;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

import javax.jms.Queue;
import javax.jms.Topic;

/**
 * 博客：https://www.xiangcaowuyu.net
 * Description:
 *
 * @Author: 香草物语
 * DateTime: 2021-07-20 14:39
 */
@Configuration
public class ActiveMQConfig {

    @Bean
    public Queue queue(){
        return new ActiveMQQueue(Constants.QUEUEMESSAGE);
    }

    @Bean
    public Topic topic(){
        return new ActiveMQTopic(Constants.TOPICMESSAGE);
    }

}
